package com.wcarmon.life.command{

    import com.adobe.cairngorm.commands.ICommand
    import com.adobe.cairngorm.control.CairngormEvent;
	import mx.controls.Alert;
	import mx.rpc.events.ResultEvent;
	import mx.rpc.events.FaultEvent;
	import mx.rpc.IResponder;
	import com.wcarmon.life.model.LifeModelLocator;
	import com.wcarmon.life.event.*;
	import com.wcarmon.life.business.*;
	import com.wcarmon.life.vo.*;
	import mx.utils.ObjectUtil;
	import mx.collections.*;
	

	public class UnCompleteBlockCommand implements ICommand, IResponder {
		include "../../includes/loggerSnippet.as";
		
		public var callbackScreen : Object;  
		
		public function execute( event : CairngormEvent ) : void { 
			var e : UnCompleteBlockEvent = UnCompleteBlockEvent( event );
			this.callbackScreen = e.callbackScreen;
			( new CompleteRejectBlockDelegate(this) ).unComplete( e.blockId );
		}
	
	 	public function result( event : Object ) : void {
			var model : LifeModelLocator = LifeModelLocator.getInstance();
			callbackScreen.doBlockUpdateCallback();
		}
	
		public function fault( event : Object ) : void {
			include "includes/FaultSnippet.as";
		}
	}
}